<?php


class Module_OrganCase_Cases extends Module_BaseModule
{
    use Lib_BaseTraitsModule;

    private static $obj = null;
    private $model = null;

    /**
     * 封闭构造.
     */
    public function __construct()
    {
        $this->model = new Model_OrganCase_Cases();
    }

    /**
     * 单例获取
     * 保证一条进程只产生一个Module对象
     *
     * @return Module_OrganCase_Cases
     */
    public static function getInstance()
    {
        if (empty(self::$obj)) {
            self::$obj = new self();
        }

        return self::$obj;
    }

    /*
   **添加
   * @param $insertdata
   * @return mixed
   */
    public function insert($insertdata)
    {
        return $this->model->insert($insertdata);
    }

    /**
     * 修改数据.
     */
    public function update($update, $id)
    {
        return $this->model->update($update, $id);
    }

    /**
     * 获取原告列表.
     */
    public function getList($start = 0, $limit = 0)
    {
        return $this->model->getList($start, $limit);
    }

    /**
     * 获取原告个数.
     */
    public function getCount()
    {
        return $this->model->getCount();
    }

    public function updateCaseinfo($id, $case_info = null, $case_info_detail = null)
    {
        if (!$id) {
            return false;
        }
        return $this->model->updateCaseinfo($id, $case_info, $case_info_detail);
    }
}
